/**
 * 配置该文件可以参考:
 * https://cli.vuejs.org/zh/config/#%E7%9B%AE%E6%A0%87%E6%B5%8F%E8%A7%88%E5%99%A8
 *
 */
//const url = "http://192.168.200.12:9999"; //米伟伟
 //const url = "http://192.168.2.10:9999"; //服务器http://xiexin.nat123.net:38258
//const url = "http://xiexin.nat123.net:38258"   //打包http://attw34.natappfree.cc
//const url = "http://attw34.natappfree.cc" http://xiexin.nat123.net:38258
//const url = "http://xiexin.nat123.net:38258"  http://pfzhang.natapp1.cc
 const url = "http://pfzhang.natapp1.cc/";
let publicPath = "./";
module.exports = {
  publicPath: publicPath,
  lintOnSave: true,
  productionSourceMap: false,
  chainWebpack: config => {
    // 忽略的打包文件
    config.externals({
      axios: "axios"
    });
    const entry = config.entry("app");
    entry.add("babel-polyfill").end();
    entry.add("classlist-polyfill").end();
  },
  // 配置转发代理
  devServer: {
    port: 8080,
    disableHostCheck: true,
    proxy: {
      "/": {
        target: url,
        ws: true,
        pathRewrite: {

          "^/": "/"
        }
      }
      // v2.7.0 不需在配置前端代理
    }
  }
}
